package com.woniuxy.dudugua.service;

import com.woniuxy.dudugua.entity.Order;
import com.woniuxy.dudugua.entity.ReturnGoods;
import com.woniuxy.dudugua.util.view.ReturnGoodsAndProductView;
import com.woniuxy.dudugua.util.view.ReturnProductView;

import java.util.List;

public interface ReturnGoodsService {
    //根据orderid查询当前order的中的商品信息
    List<ReturnProductView> selectProductByOrderId(int orderId);
    //根据orderid查询returngoods
    ReturnGoods selectByOrderId(int orderId);
    //新增退货申请
    int insertReturnGoods(ReturnGoods returnGoods);
    //根据userid查询所有订单
    List<ReturnGoodsAndProductView> selectByUserId(int userid);
    //根据id查询returngoods
    ReturnGoods selectById(int id);
    //根据returngoodsid获取order对象
    Order selectOrderByReturnId(int returnid);
    //根据returngoodsid查询returnproductview对象
    ReturnGoodsAndProductView selectReturnProductViewByReturnId(int returnid);
    //更新运单号 需要更新returngoods表和returnprocess表的状态
    int updateTrackNumberByReturnId(int returnId,String trackNumber);
}
